package com.czkt.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.czkt.entity.SalPlan;
import com.czkt.entity.vo.PlanAndChance;
import com.czkt.mapper.SalPlanMapper;
import com.czkt.service.ISalPlanService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2024-06-18
 */
@Service
public class SalPlanServiceImpl extends ServiceImpl<SalPlanMapper, SalPlan> implements ISalPlanService {

    @Resource
    SalPlanMapper salPlanMapper;

    @Override
    public IPage<PlanAndChance> selectBatchIds(String chcCustName, String chcLinkman, String chcTitle, Integer pageIndex, Integer pageSize) {
        Page<PlanAndChance> page = new Page<>(pageIndex,pageSize);
        return salPlanMapper.selectBatchIds(page,chcCustName,chcLinkman,chcTitle);
    }

    @Override
    public SalPlan selectAllByPlaChcId(String plaChcId) {
        return salPlanMapper.selectAllByPlaChcId(plaChcId);
    }
}
